package com.infolab.aims.domain.asset;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.infolab.aims.common.bean.AbstractModelBean;

@Entity
@Table(name="AMTB_CONSUMPTION")
public class AssetConsumption extends AbstractModelBean implements Serializable {
	
	@Id	
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer assetConsumptionId;
	
	private Integer quantityReceived;
	
	private Integer quantityUsed;
	
	@ManyToOne
	@JoinColumns({@JoinColumn(name="assetModelId"),@JoinColumn(name="companyCode"),@JoinColumn(name="locationId")})
	private AssetComponent assetComponent;
	
	private boolean assetConsumptionStatus;
	
	private Float unitPrice;
	
	private Integer vendorId;
	
	private String transactionType;
	
	private String refNo;

	public Integer getAssetConsumptionId() {
		return assetConsumptionId;
	}

	public void setAssetConsumptionId(Integer assetConsumptionId) {
		this.assetConsumptionId = assetConsumptionId;
	}

	public Integer getQuantityReceived() {
		return quantityReceived;
	}

	public void setQuantityReceived(Integer quantityReceived) {
		this.quantityReceived = quantityReceived;
	}

	public Integer getQuantityUsed() {
		return quantityUsed;
	}

	public void setQuantityUsed(Integer quantityUsed) {
		this.quantityUsed = quantityUsed;
	}

	public AssetComponent getAssetComponent() {
		return assetComponent;
	}

	public void setAssetComponent(AssetComponent assetComponent) {
		this.assetComponent = assetComponent;
	}

	public boolean isAssetConsumptionStatus() {
		return assetConsumptionStatus;
	}

	public void setAssetConsumptionStatus(boolean assetConsumptionStatus) {
		this.assetConsumptionStatus = assetConsumptionStatus;
	}

	public Float getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(Float unitPrice) {
		this.unitPrice = unitPrice;
	}

	public String getTransactionType() {
		return transactionType;
	}

	public void setTransactionType(String transactionType) {
		this.transactionType = transactionType;
	}

	public String getRefNo() {
		return refNo;
	}

	public void setRefNo(String refNo) {
		this.refNo = refNo;
	}

	public Integer getVendorId() {
		return vendorId;
	}

	public void setVendorId(Integer vendorId) {
		this.vendorId = vendorId;
	}
}
